home *** CD-ROM | disk | FTP | other *** search
/ Windows News 2007 June/July / Windows News Hors série Numéro 34 juin juillet 2007.iso / Rédaction / Astuces Windows XP / IconesBureau.bat < prev    next >
Encoding:
DOS Batch File  |  2007-01-30  |  2.1 KB  |  39 lines

  1. @echo off
  2. If {%4}=={} @echo Syntax IconesBureau MesDocuments PosteTravail FavorisReseau InternetExplorer&goto :EOF
  3. setlocal
  4. If {%4}=={} @echo Syntax IconesBureau MesDocuments PosteTravail FavorisReseau InternetExplorer&endlocal&goto :EOF
  5. set MesDocuments=%1
  6. set PosteTravail=%2
  7. set FavorisReseau=%3
  8. set InternetExplorer=%4
  9. if /i "%MesDocuments%" EQU "M" set MesDocuments=1&goto tMC
  10. if /i "%MesDocuments%" EQU "A" set MesDocuments=0&goto tMC
  11. @echo Syntax IconesBureau - My Documents NOT A or M&endlocal&goto :EOF
  12. :tMC
  13. if /i "%PosteTravail%" EQU "M" set PosteTravail=1&goto tMN
  14. if /i "%PosteTravail%" EQU "A" set PosteTravail=0&goto tMN
  15. @echo Syntax IconesBureau - My Computer NOT A or M&endlocal&goto :EOF
  16. :tMN
  17. if /i "%FavorisReseau%" EQU "M" set FavorisReseau=1&goto tIE
  18. if /i "%FavorisReseau%" EQU "A" set FavorisReseau=0&goto tIE
  19. @echo Syntax IconesBureau - My NetworkPlaces NOT A or M&endlocal&goto :EOF
  20. :tIE
  21. if /i "%InternetExplorer%" EQU "M" set InternetExplorer=1&goto tOK
  22. if /i "%InternetExplorer%" EQU "A" set InternetExplorer=0&goto tOK
  23. @echo Syntax IconesBureau - Internet Explorer NOT A or M&endlocal&goto :EOF
  24. :tOK
  25. call :quiet >Nul 2>&1
  26. endlocal
  27. goto :EOF
  28. :quiet
  29. set CV="HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\ClassicStartMenu"
  30. set XV="HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel"
  31. REG ADD %CV% /V {450D8FBA-AD25-11D0-98A8-0800361B1103} /T REG_SZ /F /D %MesDocuments%
  32. REG ADD %XV% /V {450D8FBA-AD25-11D0-98A8-0800361B1103} /T REG_SZ /F /D %MesDocuments%
  33. REG ADD %CV% /V {20D04FE0-3AEA-1069-A2D8-08002B30309D} /T REG_SZ /F /D %PosteTravail%
  34. REG ADD %XV% /V {20D04FE0-3AEA-1069-A2D8-08002B30309D} /T REG_SZ /F /D %PosteTravail%
  35. REG ADD %CV% /V {208D2C60-3AEA-1069-A2D7-08002B30309D} /T REG_SZ /F /D %FavorisReseau%
  36. REG ADD %XV% /V {208D2C60-3AEA-1069-A2D7-08002B30309D} /T REG_SZ /F /D %FavorisReseau%
  37. REG ADD %CV% /V {871C5380-42A0-1069-A2EA-08002B30309D} /T REG_SZ /F /D %InternetExplorer%
  38. REG ADD %XV% /V {871C5380-42A0-1069-A2EA-08002B30309D} /T REG_SZ /F /D %InternetExplorer%
  39.